<?php
session_start();
$user=isset($_SESSION["user"])?$_SESSION["user"]:null;
if(!$user){
    echo "未登录，请先登录<a href='login.html'>登录</a>";
}else{
    echo "<!DOCTYPE html>";
    echo "<html>";
?>
      <head>
            <meta http-equiv="content-type" content="text/html;charset=utf8"/>
            <title>第一个网页</title>
        </head>
        <body>
            <h3>新增文章</h3>
            <form action="article_add_do.php" method="post">
                <div>
                    <label>标题</label>
                    <input type="text" name="Title" id="Title" />
                </div>
                <div>
                    <label>内容</label>
                    <textarea name="Content" id="Content" cols="80" rows="20"></textarea>
                </div>
                <div>
                    <label>作者</label>
                    <span>
                        <?php echo $user["Username"]?>
                    </span>
                </div>
                <div>
                    <input type="submit" value="提交"/>
                    <input type="reset" value="重置"/>
                </div>
            </form>
        </body>
</html>
<?php } ?>